package com.fastshopping.order.dao;

import com.fastshopping.order.pojo.Account;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface AccountMapper extends Mapper<Account> {

    //根据id查询账户明细
    @Select("SELECT \n" +
            "        `id`,\n" +
            "        `pay_money`,\n" +
            "        `pay_type`,\n" +
            "        `end_time`\n" +
            "FROM\n" +
            "        `shopping`.`tb_order` \n" +
            "WHERE \n" +
            "\t\tstore_account_id IN (\n" +
            "\t\tSELECT store_account_id FROM tb_store_account WHERE id=#{id}\n" +
            "\t\t)")
    List<Map> findDetailById(int id);

}
